/*
 * @Author: your name
 * @Date: 2021-03-06 09:56:21
 * @LastEditTime: 2021-04-09 14:20:55
 * @LastEditors: Please set LastEditors
 * @Description:项目
 * @FilePath: \html\src\api\project\project.js
 */
import request from '@/utils/request'
import { config } from '@/utils/requestconfig'
export function getProjectData(data) {
  return request({
    baseURL: config.webapi,
    url: 'Project/LoadPage',
    method: 'post',
    data: data
  })
}
// 根据权限获取项目列表
export function GetProjectByIsPermissions(data) {
  return request({
    baseURL: config.webapi,
    url: 'Project/GetProjectByIsPermissions',
    method: 'post',
    data: data
  })
}

export function getDepartProject(data) {
  return request({
    baseURL: config.webapi,
    url: 'Project/GetDepartProject',
    method: 'post',
    data: data
  })
}
// 新增
export function addProject(data) {
  return request({
    baseURL: config.webapi,
    url: 'Project/AddProject',
    method: 'post',
    data: data
  })
}
export function editProject(data) {
  return request({
    baseURL: config.webapi,
    url: 'Project/EditProject',
    method: 'post',
    data: data
  })
}
// 删除
export function deleteProject(id) {
  return request({
    baseURL: config.webapi,
    url: 'Project/Delete',
    method: 'post',
    data: {
      id: id
    }
  })
}
export function FindProjectById(id) {
  return request({
    baseURL: config.webapi,
    url: 'project/FindProjectById',
    method: 'get',
    params: { id: id }
  })
}
export function getUnitProject() {
  return request({
    baseURL: config.webapi,
    url: 'Project/GetUnitProject',
    method: 'get'
  })
}
